package com.yanfan.energy.controller;

import com.yanfan.common.core.domain.AjaxResult;
import com.yanfan.energy.service.WorkshopService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "车间控制层")
@RestController
@RequestMapping("/workshop")
public class WorkshopController {
    @Autowired
    private WorkshopService workshopService;

    /**
     * 查询所有楼栋及以下车间
     *
     * @return 查询结果
     */
    @ApiOperation("查询所有楼栋及以下车间")
    @GetMapping("/shortWorkshop")
    public AjaxResult findWorkshop() {
        return workshopService.shortWorkshop();
    }


}
